import axios from "axios";

export function getChildDictById(params: any) {
    return axios.get("/sys/dict/child/get/id", {
        params: {
            id: params
        }
    });
}

/**
 * 分页查询子字典
 */
export function getPageChildDict(params: any) {
    return axios.get("/sys/dict/child/list/page", {
        params: params
    });
}

/**
 * 添加或更新子字典
 * @param data
 */
export function saveOrUpdateChildDict(data: any) {
    return axios.post("/sys/dict/child/saveOrUpdate/manual", data);
}

/**
 * 根据id删除子字典
 * @param params
 */
export function deleteChildDictById(params: any) {
    return axios.delete("/sys/dict/child/delete/id", {
        params: params
    });
}
